//
//  JgAdsSplashAdContainer.h
//  AnyThinkSDKDemo
//
//  Created by 李上京 on 2022/11/14.
//  Copyright © 2022 抽筋的灯. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <JgAdsSDK/JgAdsSplashAd.h>
@class JgAdsSplashAdContainer;
NS_ASSUME_NONNULL_BEGIN

@protocol JgAdsSplashAdContainerDelegate <NSObject>
/**
 *  开屏广告素材加载成功
 */
- (void)jgadsContainer_jgadsSplashAdDidLoad:(JgAdsSplashAdContainer *)splashAd withPrice:(NSInteger)bidPrice;

/**
 *  开屏广告请求失败
 */
- (void)jgadsContainer_jgadsSplashAdFailLoadError:(NSError *)error;

@end

@interface JgAdsSplashAdContainer : NSObject

@property (nonatomic, weak)id<JgAdsSplashAdContainerDelegate> containerDelegate;

@property (nonatomic, weak)id<JgAdsSplashAdDelegate> delegate;

/// 初始化容器
- (instancetype)initPosId:(NSString *)posId delegate:(id<JgAdsSplashAdDelegate>)delegate;

/// 加载并展示
- (void)loadAndShowInWindow:(UIWindow *)window withBottomView:(nullable UIView *)bottomView;

/// 加载
- (void)loadAdWithBottomView:(UIView *)bottomView;

/// 展示
- (void)showAdInWindow:(UIWindow *)window withBottomView:(nullable UIView *)bottomView;

/// 销毁
- (void)close;

///上报竞赢通知
- (void)sendWinNotificationWithPrice:(NSInteger)price;

///上报竞败通知
- (void)sendWinFailNotificationReason:(JgAdsBiddingLossReason)lossReason winnerPirce:(NSInteger)winnerPirce;

///获取竞价价格
- (NSInteger)getBidPrice;
@end

NS_ASSUME_NONNULL_END
